<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            text-align: center;
        }
        span{
            color: gold;
            width: 120px;
            background-color: aquamarine;
            position: absolute;
            left:50%;
            right: 0;
            margin-left: -60px;
            /*transform: translateX(-50%);*/
        }
    </style>
</head>
<body>
<span>span文字</span>
</body>
</html>